1. Technical Field
The present invention relates in general to a method and system for data processing and in particular to an improved method and system of moving or copying data within a data, processing system. Still more particularly, the present invention relates to an improved method and system for pausing move or copy operations in order to provide computing resources to other system operations.
2. Description of the Related Art
Within data processing systems, common tasks include moving and copying data from one file to another. Moving a file includes copying the source file to a new location and then erasing the source file when the copying is completed. In the lexicon of this invention, the term xe2x80x9ccopyxe2x80x9d (and derivatives thereof) is used herein to include the concept of moving files since moving files simply involves a copy operation followed by erasing the source file used during the copy operation.
As systems grow in complexity, files that need to be copied often become larger and larger. Files often include graphics, audio data, large executables, and multimedia files. Copying these files from one location to another requires substantial computer resources. These resources include hard disk space, memory, processors, and network resources. When one task, such as a large move or copy operation, utilizes substantial computing resources, few resources remain for other computer operations. Other operations may then become extremely slow or stall because they are not receiving the resources necessary for proper execution.
With the increased popularity of computer networks, including the Internet, users often want to copy files from one computer system to another. In order to copy files from one computer system to another, data from the source data file is transmitted across the network to the target computer system and stored in a file on the target computer system. Copying files between computer systems using a computer network involves even more resources, including network interfaces and Internet service provider (ISP) computer systems. Programs that copy files, such as may exist in a web page, from a server to a client computer over the Internet often allow the user to stop the operation. When the copy is resumed, the web browser compares the files needed to be copied with a memory cache on the user""s computer. However, files that are incomplete are often fully re-transmitted from the server computer. In addition, the cache must first be searched for files, or portions of files, that were previously transmitted before the copy operation can resume.
The available resources in a typical data processing system must be distributed among various processes being executed by the computer system. Copying large data files can be a very system intensive task using a large amount of system resources. While a copy operation is taking place, other system processes may become xe2x80x9cstarvedxe2x80x9d for computer resources and may appear to halt or otherwise slow down. A user may want another task to complete quickly, but a currently executing copy operation may render this impossible. The copy process maybe copying a file that is not time critical (i.e. the user does not need the move/copy process to complete immediately), and thus the user""s time-critical task is waiting for a less time-critical copy operation to complete.
One possible solution is that, the user cancel the copy operation. However, by canceling the copy operation, the data that has already been copied would have to be recopied when the copy operation is re-invoked by the user. A challenge in the prior art is temporarily suspending the copy operation without canceling the copy operation and without having to re-copy the entire source file at a later time.
It has been determined that a move or copy command can be improved by providing a pause button for the user from the move/copy screen. When the user selects the pause button, the copy operation is suspended. Information regarding the copy operation is retained so that the operation can be resumed at a later time. In one embodiment, the source file is partitioned into blocks of data. When the pause button is pressed, an index is stored which points to the next block of data in the source file to be copied. When resume processing is requested by the user, the index is read and, processing commences at the next block in the source file (i.e. the block following the last block that was copied before the pause command button was selected). In another embodiment, information regarding the source file name, target file name, block size, and next block number is stored in order to extend the amount of time between a pause and subsequent resume. By saving the information, the copy operation can be terminated and resumed at a later time (e.g., following a system restart) without having, to re-copy data that was previously copied.
The foregoing is a summary and thus contains, by necessity, simplifications, generalizations, and omissions of detail; consequently, those skilled in the art will appreciate that the summary is illustrative only and is not intended to be in any way limiting. Other aspects, inventive features, and advantages of the present invention, as defined solely by the claims, will become apparent in the non-limiting detailed description set forth below.